<template>
	<div id="dz_config1" class="page in " data-title="">
		<div class="container">
			<header>
				<a @click="$utils.gotopage('','back')" class="pa back"></a>
				<p>HF系列</p>
			</header> 

			<div class="config-wrap">
				<div class="history-ul pa configlist-ul">
					<scroll-view class="scroll-Y" scroll-y="true" @scrolltolower="lower" style="height:80vh;">
						<div class="history-li flex-wrap-start" v-for="(item, index) in serieslist" :key="index" @click="nfgoto(item.device_id)">
							<span><img :src="item.singleimg" alt=""   /></span>
							<div>
								<span>{{ item.mac_type }}</span>
								<span>{{item.descri}}</span>
							</div>
						</div>
					</scroll-view>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
var mySelf;
export default {
	data() {
		return {
			serieslist: [],
			param: []
		};
	},
	beforeCreate() {
		this.$myUtils.isLoginGotoPage();
	},
	onLoad(param) {
		this.param = param;
	},
	mounted() {
		mySelf = this;
		// this.$utils.gotopage('back')
		this.init();
	},
	onReachBottom() {
		debugger;
		console.log('onReachBottom：function');
	},
	onPullDownRefresh() {
		console.log('onPullDownRefresh：function');
	},
	methods: {
		// back(){
		// 	this.$utils.gotopage('','back')
		// },
		lower:function(){
			debugger
		},
		init: function() {
			let _q = this.param['series_id'];
		 
			this.$myUtils
				.myRequest({
					url: '/Series/mactypeList?series_id=' + _q
				})
				.then(res => {
					mySelf.serieslist = res.data.req;
					if (!mySelf.serieslist) {
						return uni.showToast({
							title: '未找到符合条件的数据',
							icon: 'info',
							duration: 1000
						});
					}
					
					return uni.showToast({
						title: '正在加载数据',
						icon: 'loading',
						duration: 1000
					});
				});
		},

		nfgoto: function(device_id) {
			uni.navigateTo({
				url: '/pages/configinfo/configinfo?device_id=' + device_id
			});
		}
	}
};
</script>
